﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
         CodeBehind="Default.aspx.cs" Inherits="AzureMRUI.Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="jobdatasource">
        <Columns>           
            
            <asp:TemplateField HeaderText="Job ID">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("RowKey", "JobData.aspx?JobID={0}&refresh=15") %>'
                                   Text='<%# Bind("RowKey") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Num Maps">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("RowKey", "MapTasks.aspx?JobID={0}&refresh=15") %>'
                                   Text='<%# Bind("NumMapTasks") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Num Reduce">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("RowKey", "ReduceTasks.aspx?JobID={0}&refresh=15") %>'
                                   Text='<%# Bind("NumReduceTasks") %>'></asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>           
            <asp:BoundField DataField="CurrentIteration" HeaderText="Current Iteration" 
                            SortExpression="CurrentIteration" />
            <asp:BoundField DataField="OutDir" HeaderText="Out Dir" 
                            SortExpression="OutDir" />
            <asp:BoundField DataField="InDir" HeaderText="In Dir" SortExpression="InDir" />
            <asp:BoundField DataField="StartTime" HeaderText="Start Time" 
                            SortExpression="StartTime" />
            <asp:CheckBoxField DataField="PerformMerge" HeaderText="Merge" 
                               SortExpression="PerformMerge" />
            <asp:BoundField DataField="Timestamp" HeaderText="Time stamp" 
                            SortExpression="Timestamp" />
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="jobdatasource" runat="server" SelectMethod="GetJobs" TypeName="AzureMRCore.DataModel.JobDataSource">
    </asp:ObjectDataSource>
</asp:Content>